package com.js.purs.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.js.purs.mapper.PurAppRecordsMapper;
import com.js.purs.domain.PurAppRecords;
import com.js.purs.service.IPurAppRecordsService;

/**
 * 审批计划Service业务层处理
 * 
 * @author lzq
 * @date 20240625
 */
@Service
public class PurAppRecordsServiceImpl implements IPurAppRecordsService 
{
    @Autowired
    private PurAppRecordsMapper purAppRecordsMapper;

    /**
     * 查询审批计划
     * 
     * @param flowId 审批计划主键
     * @return 审批计划
     */
    @Override
    public PurAppRecords selectPurAppRecordsByFlowId(Long flowId)
    {
        return purAppRecordsMapper.selectPurAppRecordsByFlowId(flowId);
    }

    /**
     * 查询审批计划列表
     * 
     * @param purAppRecords 审批计划
     * @return 审批计划
     */
    @Override
    public List<PurAppRecords> selectPurAppRecordsList(PurAppRecords purAppRecords)
    {
        return purAppRecordsMapper.selectPurAppRecordsList(purAppRecords);
    }

    /**
     * 新增审批计划
     * 
     * @param purAppRecords 审批计划
     * @return 结果
     */
    @Override
    public int insertPurAppRecords(PurAppRecords purAppRecords)
    {
        purAppRecords.setCreateTime(DateUtils.getNowDate());
        return purAppRecordsMapper.insertPurAppRecords(purAppRecords);
    }

    /**
     * 修改审批计划
     * 
     * @param purAppRecords 审批计划
     * @return 结果
     */
    @Override
    public int updatePurAppRecords(PurAppRecords purAppRecords)
    {
        return purAppRecordsMapper.updatePurAppRecords(purAppRecords);
    }

    /**
     * 批量删除审批计划
     * 
     * @param flowIds 需要删除的审批计划主键
     * @return 结果
     */
    @Override
    public int deletePurAppRecordsByFlowIds(Long[] flowIds)
    {
        return purAppRecordsMapper.deletePurAppRecordsByFlowIds(flowIds);
    }

    /**
     * 删除审批计划信息
     * 
     * @param flowId 审批计划主键
     * @return 结果
     */
    @Override
    public int deletePurAppRecordsByFlowId(Long flowId)
    {
        return purAppRecordsMapper.deletePurAppRecordsByFlowId(flowId);
    }
}
